package persistence.product;
public class ProductPersistFactory {

    public static ProductDAO getProductDAO(String persistenceMechanism){
        if (persistenceMechanism.equals("file")){
            return ProductDAOFile.getJDBCPersistenceManager();
        }
        else if  (persistenceMechanism.equals("JDBC")){
            return ProductDAOJDBC.getJDBCPersistenceManager();
        }
        else if  (persistenceMechanism.equals("pool")){
            return ProductDAOPool.getProductDAOPoolImplementation();
        }
        else{
            return null;
        }
    }
}
